// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdFieldGroup
 */
public class AdFieldGroupDaoImpl
    extends org.tinaelle.server.domain.AdFieldGroupDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdFieldGroupDao#toAdFieldGroupDTO(org.tinaelle.server.domain.AdFieldGroup)
     */
    public org.tinaelle.common.dto.AdFieldGroupDTO toAdFieldGroupDTO(final org.tinaelle.server.domain.AdFieldGroup entity)
    {
        return super.toAdFieldGroupDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdFieldGroup loadAdFieldGroupFromAdFieldGroupDTO(org.tinaelle.common.dto.AdFieldGroupDTO adFieldGroupDTO)
    {
        org.tinaelle.server.domain.AdFieldGroup adFieldGroup = this.load(adFieldGroupDTO.getAdFieldGroupId());
        if (adFieldGroup == null)
        {
            adFieldGroup = org.tinaelle.server.domain.AdFieldGroup.Factory.newInstance();
        }
        return adFieldGroup;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdFieldGroupDao#adFieldGroupDTOToEntity(org.tinaelle.common.dto.AdFieldGroupDTO)
     */
    public org.tinaelle.server.domain.AdFieldGroup adFieldGroupDTOToEntity(org.tinaelle.common.dto.AdFieldGroupDTO adFieldGroupDTO)
    {
        org.tinaelle.server.domain.AdFieldGroup entity = this.loadAdFieldGroupFromAdFieldGroupDTO(adFieldGroupDTO);
        this.adFieldGroupDTOToEntity(adFieldGroupDTO, entity, true);
        return entity;
    }
}